package org.webcat.electronicsubmissionplugin.wizard;

import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * The second panel display on the wizard. Communication between model and
 * this panel handled by {@link SubmitWizardPanel2}.
 * @author rob44, rstodd13, samccarn
 */
public final class SubmitVisualPanel2 extends JPanel {

    /** Creates new form SubmitVisualPanel2 */
    public SubmitVisualPanel2() {
        initComponents();
    }

    /**
     * Netbeans method. Sets the title of the panel.
     * @return the title
     */
    @Override
    public String getName() {
        return "Submission Result";
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        headerPanel = new javax.swing.JPanel();
        instructions = new javax.swing.JLabel();
        icon = new javax.swing.JLabel();
        submissionStatusPanel = new javax.swing.JPanel();
        submissionStatusLabel = new javax.swing.JLabel();
        statusIcon = new javax.swing.JLabel();

        setPreferredSize(new java.awt.Dimension(539, 565));

        headerPanel.setBackground(new java.awt.Color(255, 255, 255));

        instructions.setFont(new java.awt.Font("Tahoma", 0, 14));
        instructions.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        org.openide.awt.Mnemonics.setLocalizedText(instructions, org.openide.util.NbBundle.getMessage(SubmitVisualPanel2.class, "SubmitVisualPanel2.instructions.text")); // NOI18N

        icon.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        icon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/banner-nobg.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(icon, org.openide.util.NbBundle.getMessage(SubmitVisualPanel2.class, "SubmitVisualPanel2.icon.text")); // NOI18N

        javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
        headerPanel.setLayout(headerPanelLayout);
        headerPanelLayout.setHorizontalGroup(
            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(headerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(instructions, javax.swing.GroupLayout.PREFERRED_SIZE, 304, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(140, 140, 140)
                .addComponent(icon)
                .addContainerGap(18, Short.MAX_VALUE))
        );
        headerPanelLayout.setVerticalGroup(
            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(headerPanelLayout.createSequentialGroup()
                .addGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(icon, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
                    .addGroup(headerPanelLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(instructions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        submissionStatusPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(SubmitVisualPanel2.class, "SubmitVisualPanel2.submissionStatusPanel.border.title"))); // NOI18N

        submissionStatusLabel.setFont(new java.awt.Font("Tahoma", 0, 14));
        submissionStatusLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        org.openide.awt.Mnemonics.setLocalizedText(submissionStatusLabel, org.openide.util.NbBundle.getMessage(SubmitVisualPanel2.class, "SubmitVisualPanel2.submissionStatusLabel.text")); // NOI18N

        statusIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/loading.gif"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(statusIcon, org.openide.util.NbBundle.getMessage(SubmitVisualPanel2.class, "SubmitVisualPanel2.statusIcon.text")); // NOI18N

        javax.swing.GroupLayout submissionStatusPanelLayout = new javax.swing.GroupLayout(submissionStatusPanel);
        submissionStatusPanel.setLayout(submissionStatusPanelLayout);
        submissionStatusPanelLayout.setHorizontalGroup(
            submissionStatusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(submissionStatusPanelLayout.createSequentialGroup()
                .addGap(118, 118, 118)
                .addComponent(statusIcon)
                .addGap(18, 18, 18)
                .addComponent(submissionStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(124, Short.MAX_VALUE))
        );
        submissionStatusPanelLayout.setVerticalGroup(
            submissionStatusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(submissionStatusPanelLayout.createSequentialGroup()
                .addGap(99, 99, 99)
                .addGroup(submissionStatusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(submissionStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(statusIcon))
                .addContainerGap(302, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(headerPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(submissionStatusPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(headerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(submissionStatusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel headerPanel;
    private javax.swing.JLabel icon;
    private javax.swing.JLabel instructions;
    private javax.swing.JLabel statusIcon;
    private javax.swing.JLabel submissionStatusLabel;
    private javax.swing.JPanel submissionStatusPanel;
    // End of variables declaration//GEN-END:variables

    /**
     * Gets the submission status label.
     *
     * @return the submission status label
     */
    public JLabel getSubmissionStatusLabel() {
        return submissionStatusLabel;
    }

    /**
     * Gets the status icon.
     *
     * @return the status icon
     */
    public JLabel getStatusIcon() {
        return statusIcon;
    }


// currently nothing in here. need to add stuff done when a result is recieved.


}
